package com.wzcl.app.dao.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.wzcl.app.dao.model.common.Base;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;

@Data
@Entity
@Table(name = "TopicOption")
@ApiModel(value = "题目选项表")
@EntityListeners(AuditingEntityListener.class)
public class TopicOption implements Base {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    @ManyToOne
    @JsonIgnore
    @JoinColumn(name = "topicInfoId")
    private TopicInfo topicInfo;

    @ApiModelProperty(value = "选项A,B,C,D")
    private String optionCode;

    @ApiModelProperty(value = "选项内容")
    @Column(columnDefinition = "text")
    private String  content;

    @ApiModelProperty(value = "排序字段")
    private Integer orderNo;
}
